In onboard audiovisual equipment such as a disk playback apparatus like a CD (Compact Disc) player, an internal microcomputer (referred to as “micro” from now on) wakes up after accepting an IGN-on signal of an ignition (referred to as “IGN” from now on) switch, followed by various steps such as track up and track down for playback and selection of music of a disk, display of the track number and the time elapsed, ejection and absorption of a disk and increase or decrease of the volume.
When the IGN switch is turned off, the micro receives the IGN-off signal, executes sleep mode preprocessing such as the stop of playback of a disk, and shifts to a sleep mode.
Unless it shifts to the sleep mode at the IGN off, and hence the micro is in the wakeup mode, the clock for operating the micro continues an oscillating state, which is a factor in battery run-down because of a large consumption current. Accordingly, during the IGN off, it stops the oscillation of the clock for operating the micro and shifts to the sleep mode for stopping its operation, so that the micro can reduce the consumption current. This makes it possible to lower the current consumption of the micro and to prevent the battery run-down.
When the IGN switch is turned on from the IGN off again, the micro wakes up, starts oscillation of the clock to restart the operation and various processing. The term “wakeup” means that the clock for operating the micro moves from the stop state into the oscillating state.
On the other hand, some types of disk playback apparatus have an Anytime-Eject function. The term “Anytime-Eject function” means that during the IGN off (the micro is in a sleep mode), the micro temporarily wakes up in response to pushing down of the disk eject button of the disk playback apparatus and ejects a disk if it is left in the apparatus.
The following (1)-(4) are a background of providing the Anytime-Eject function for the onboard disk playback apparatus.
(1) A driver arrives at home while listening to a CD using an onboard disk playback apparatus, puts the car in the garage, and takes the key out of the ignition to stop the engine, thereby bringing the IGN in the off state. The onboard disk playback apparatus shifts to a sleep mode.
(2) When the driver opens the door and is going outside the car, he or she realizes that the CD is left in the onboard disk playback apparatus.
(3) The driver pushes down the disk eject button of the onboard disk playback apparatus to eject the CD.
(4) The onboard disk playback apparatus ejects the CD and the driver takes the CD from it.
In the foregoing (4), even if the onboard disk playback apparatus stops its operation in the IGN off state, the Anytime-Eject function enables the CD ejection operation. In contrast with this, without the Anytime-Eject function, unless the driver inserts the key and turns on the IGN switch to supply the power to the onboard disk playback apparatus, the CD ejection operation is not carried out. In other words, the Anytime-Eject function is used to eliminate the troublesome operation such as inserting the key again to turn the IGN on only to eject the CD.
If the CD is removed in the foregoing (4), the purpose is achieved. Thus the onboard disk playback apparatus moves to the sleep mode again. Unless the CD is removed, it moves to the sleep mode after absorbing the CD after a fixed time period has elapsed. Incidentally, unless the CD remains in the apparatus, since there is no CD to be ejected, it moves to the sleep mode promptly.
Here, the wakeup operation of the micro in a conventional onboard disk playback apparatus will be described.
FIG. 5 is a diagram showing a configuration of a disk eject button of a conventional onboard disk playback apparatus. In the micro 1 that controls the operation of the disk playback apparatus, its external interrupt port 2 is connected to the GND via a push switch 4 constituting a disk eject button 5, and is connected to a power supply via a pull-up resistor 3.
While the push switch 4 is off (opened), the external interrupt port 2 is connected to the power supply via the pull-up resistor 3. Thus its electric level becomes High (referred to as [H] from now on).
While the push switch 4 is on (closed), the external interrupt port 2 is connected to the GND via the push switch 4. Thus its electric level becomes Low (referred to as [L] from now on).
In this way, when the disk eject button 5 is pushed down, the push switch 4 operates from open to close, and hence the external interrupt signal with the electric level [H]→[L] is input to the external interrupt port 2 of the micro 1. If the micro 1 detects the change of the electric level of the external interrupt port 2 ([H]→[L]) caused by pushing down the disk eject button 5 during the sleep mode, it decides that the external interrupt signal is input and wakes up.
Next, the operation will be described when the disk eject button 5 is pushed down while the micro 1 is in the sleep mode.
FIG. 6 is a flowchart of the disk ejection processing while the conventional micro 1 is in the sleep mode. At step ST1 in the sleep mode, if the disk eject button 5 is pushed down and the push switch 4 changes its state from open to close, the external interrupt signal with the electric level [H]→[L] is input to the external interrupt port 2.
At the next step ST2, the micro 1 which receives the external interrupt signal executes the wakeup processing such as switching the clock from the low speed mode to the high speed mode.
At the next step ST3, the micro 1 checks whether the electric level of the external interrupt port 2 becomes [L] to confirm whether the disk eject button 5 is really pushed down or not. Unless it is [L] (“NO” at step ST3), it proceeds to step ST11. On the other hand, if it is [L] (“YES” at step ST3), it checks at the next step ST4 whether a disk remains in the onboard disk playback apparatus or not. For example, it is carried out by the micro 1 by storing the operation information about the absorption and ejection in its internal memory and by deciding on whether the disk is left or not by checking the information in the internal memory.
If no disk remains (“NO” at step ST4), the processing proceeds to step ST11. On the other hand, if the disk remains (“YES” at step ST4), the micro 1 executes the disk ejection processing at the next step ST5. Although the details of the disk ejection processing is omitted, the micro 1 can eject the disk using a well-known technique by driving the mechanical portion such as the disk carriage motor.
At the next step ST6, the micro 1 sets its internal timer to start counting, and decides on whether the disk is removed or not at the next step ST7. If the disk is removed (“YES” at step ST7), the processing proceeds to step ST11. On the other hand, unless the disk is removed (“NO” at step ST7), it checks at the next step ST8 whether the count value of the timer reaches a threshold (10 seconds, for example), and if it does not reach (“NO” at step ST8), the processing returns to step ST7. On the other hand, if the disk is not removed beyond a lapse of 10 seconds (“YES” at step ST8), it decides that the disk is ejected once without the intention of removing it, and executes the absorption processing of the disk at the next step ST9. The disk absorption processing can be carried out by a well-known technique as the foregoing ejection processing.
At the next step ST10, the micro 1 checks on whether it completes the disk absorption processing or not, and waits for the completion (“NO” at step ST10). When the absorption is completed (“YES” at step ST10), it executes the sleep mode preprocessing by stopping the disk during the playback or by stopping supplying power to the mechanical portion such as the disk carriage motor at the next step ST11.
At the next step ST12, the micro 1 switches the clock from the high speed mode to the low speed mode to move into the sleep mode, and continues the sleep mode until the next external interrupt signal is input.
Incidentally, although the detailed description will be omitted, when the disk eject button 5 is pushed down during the disk ejection processing at step ST5, the micro 1 can execute the disk absorption processing by detecting the electric level change [H]→[L] of the external interrupt port 2. Likewise, if the disk eject button 5 is pushed down during the disk absorption processing at step ST9, the micro 1 can execute the disk ejection processing by detecting the electric level change [H]→[L] of the external interrupt port 2.
In the onboard disk playback apparatus with the foregoing configuration, if the pull-up resistor 3 has bad contact or the push switch 4 has a failure, noise occurs continuously at the external interrupt port 2. As the noise occurring because of these causes, noise with the short duration of electric level [L] and noise with the comparatively long duration of [L] are conceivable.
1. A Case where Noise with the Short Duration of Electric Level [L] Continues for a Long Time Period.
The external interrupt port 2, to which the electric signal with the electric level [H] is input normally, is brought to the electric level [L] only when the disk eject button 5 is pushed down. However, if noise occurs, and the electric signal with its electric level changing [H]→[L]→[H] repeatedly is input, the micro 1 detects an external interrupt at the level change [H]→[L] (step ST1) and wakes up (step ST2). Next, when it reconfirms the electric level at the external interrupt port 2, the next [H] can occur because of the short [L] duration (“NO” at step ST3), it decides that the input electric signal is the noise with the short [L] duration and moves into the sleep mode again (steps ST11 and ST12). However, since the next electric signal with [H]→[L]→[H] is input to the external interrupt port 2, the micro 1 starts the processing from the step ST1 again, and wakes up.
In this way, the micro 1 repeats the sleep mode and waking up so that although it enters the sleep mode once, since it cannot continue the sleep mode, it remains in a large current consumption state, thereby bringing about battery run-down.
2. A Case where Noise with the Comparatively Long Duration of Electric Level [L] Continues for a Long Period.
If noise occurs, and the electric signal with its electric level changing [H]→[L]→[L]→[L]→[H] repeatedly is input to the external interrupt port 2, the micro 1 detects an external interrupt at the level change [H]→[L] (step ST1) and wakes up (step ST2). Next, when it reconfirms the electric level of the external interrupt port 2, since it is [L] (“YES” at step ST3), it recognizes that the disk eject button 5 is pushed down and proceeds to the disk ejection processing (steps ST4 and ST5). However, since the next electric signal with [H]→[L]→[L]→[L]→[H] is input to the external interrupt port 2, the micro 1 decides that the disk eject button 5 is pushed down during the disk ejection processing at step ST5, and executes the disk absorption processing. Furthermore, since the next [H]→[L]→[L]→[L]→[H] is input, the micro 1 decides that the disk eject button 5 is pushed down during the disk absorption processing at step ST9, and executes the disk ejection processing.
In this way, the ejection processing and absorption processing of the disk are repeated so that the micro 1 cannot move into the sleep mode, thereby continuing the large current consumption state and bringing about the battery run-down.
Thus as for an electronic control apparatus of a Patent Document 1, for example, when the external interrupt signal for a wakeup is input, even if the signal is noise, the electronic control apparatus operates its micro, first. At this time, the micro makes a decision as to whether the signal is normal or not, and proceeds to the regular operation only after deciding definitely that the signal is a normal signal. If the micro decides that it is the noise signal, it proceeds to the sleep mode at this point.
This makes it possible to minimize the operating time of the micro and to reduce the current consumption.
In addition, as for a microcomputer and a wakeup detection method of a Patent Document 2, for example, the micro samples the value of the external interrupt signal input to a micro terminal, decides that it is a normal signal when the sampled signal value exceeds a predetermined threshold twice in succession, and then wakes up.
This makes it possible to prevent the micro from waking up even if narrow noise is input, thereby being able to reduce its current consumption.